package net.cl.db;

import java.sql.Connection;

import net.cl.db.sql.SqlBuilder;
import net.cl.db.sql.dialect.Dialect;

/**
 * 
 * @author caol64@gmail.com
 */
public interface DBExecutor {

	CachedResultSet query(String sql) throws DBException;

	CachedResultSet query(SqlBuilder sql) throws DBException;

	int execute(String sql) throws DBException;

	int execute(SqlBuilder sql) throws DBException;

	void beginTransaction() throws DBException;

	void commit() throws DBException;

	void rollback() throws DBException;

	Connection getConnection();

	void close();

	Dialect getDialect();

}
